|
|
 |
|
|
|
|
ReDim astrKeys(UBound(astrAll)) As String
' Convert to one-dimensional array
For intLoop = LBound(astrAll) To UBound(astrAll)
astrKeys(intLoop) = astrAll(intLoop, 0) & _
"=" & astrAll(intLoop, 1)
Next SectionGet = astrKeys
Else
SectionGet = Array()
End If
End If
End Function |
|
|
|
|
|
|
|
|
Both INI files and the Registry are extremely useful for storing application information. I recommend that you store the name and path information to your database in either of these locations. You could also store information such as the last user who logged into the machine, whether the toolbar or status bar is visible, and even paths to other files your application uses. To do all this, you can use Windows API calls as well as built-in Visual Basic functions, but better yet, you can use a class module to read and write data in either of these storage locations. |
|
|
|
|
|
|
|
|
1. How do you create an INI file? |
|
|
|
|
|
|
|
|
2. Which function retrieves data from an INI file? |
|
|
|
|
|
|
|
|
3. What type of database is the System Registry? |
|
|
|
|
|
|
|
|
4. Which built-in function gets data from the Registry? |
|
|
|
|
|
|
|
|
5. Which built-in function writes data to the Registry? |
|
|
|
|
|
|
|
|
6. If you had to store data for multiple users to get at, which location would you usean INI file or the Registry? |
|
|
|
|
|